import request from '@/utils/request'

//获取活动专题列表
export function getCafeActivityList(obj) {	
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/getCafeActivityList.action',
    method: 'post',    
    params:obj
  })
}

//停用、启用
export function updateIsUseByCafeActivityId(obj) {	
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/updateIsUseByCafeActivityId.action',
    method: 'post',  
    params:obj
  })
}

//获取所有门店
export function get4SCafeShopList() {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/get4SCafeShopList.action',
    method: 'post',      
  })
}

//获取咖啡商品二级分类
export function getCafeServSecondClass(){
	return request({
		baseURL:window.getIps+'/4SCAFE/CafeActivitySystem/getCafeServSecondClass.action',
		method:'post',
	})
}

//根据门店唯一标识获取商品列表
export function getServDetailByCompId(obj) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/getServDetailByCompId.action',
    method: 'post',
    params:obj
  })
}

//添加营销
export function addCafeActivity(obj) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/addCafeActivity.action',
    method: 'post',
    params:obj
  })
}

//删除营销专题
export function deleteCafeActivity(id) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/deleteCafeActivity.action',
    method: 'post',
    params:{'CAFE_ACTIVITY_Id':id}
  })
}

//编辑营销
export function getCafeActivityInfo(id) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/getCafeActivityInfo.action',
    method: 'post',
    params:{'CAFEACTIVITY_ID':id}
  })
}

//根据活动ID获取活动商品列表
export function getCafeActivityGoodsByCafeActivityId(obj) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/getCafeActivityGoodsByCafeActivityId.action',
    method: 'post',
    params:obj
  })
}

//删除营销专题里的单个商品
export function deleteCafeActivityGoods(id) {
  return request({
    baseURL: window.getIps+'/4SCAFE/CafeActivitySystem/deleteCafeActivityGoods.action',
    method: 'post',
    params:{'CAFE_ACTIVITY_GOODS_Id':id}
  })
}


